package com.zx.map.service;

import com.zx.map.service.model.AgentInfoModel;
import com.zx.map.service.model.EncashLogModel;
import com.zx.map.service.model.EncashResponse;
import com.zx.map.service.model.SettleCardInfoModel;
import com.zx.mobile.domain.EncashQueryDomain;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA. User: Administrator Date: 14-3-1 Time: 上午11:06 To
 * change this template use File | Settings | File Templates.
 */
public interface EncashLogService {
	/**
	 * T+1出款
	 */
	public EncashResponse dealEncashLogT1(final EncashLogModel encashLogModel,
			final SettleCardInfoModel settleCardInfoModel);

	/**
	 * T0实时出款
	 * 
	 * @param encashLogModel
	 * @param settleCardInfoModel
	 */
	public EncashResponse dealEncashLogT0(EncashLogModel encashLogModel,
			SettleCardInfoModel settleCardInfoModel);

	/**
	 * 根据Model查找列表
	 * 
	 * @param model
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public List<EncashLogModel> getListByModel(EncashLogModel model)
			throws DataAccessException;

	/**
	 * 
	 * 取现订单查询条件获取交易信息
	 * 
	 * @param encashQueryDomain
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public List<EncashLogModel> getListByDomain(
			EncashQueryDomain encashQueryDomain) throws DataAccessException;

	/**
	 * 订单查询条件获取交易信息 后端查询服务 主要是查询条件日期YYYY-MM-DD
	 * 
	 * @param encashQueryDomain
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public List<EncashLogModel> getListByDomainForManage(
			EncashQueryDomain encashQueryDomain) throws DataAccessException;

	/**
	 * 新增并返回主键
	 * 
	 * @param model
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public String add(EncashLogModel model) throws DataAccessException;

	/**
	 * 更新并返回主键
	 * 
	 * @param model
	 * @throws org.springframework.dao.DataAccessException
	 */
	public String update(EncashLogModel model) throws DataAccessException;

	/**
	 * 删除
	 * 
	 * @return
	 * @throws org.springframework.dao.DataAccessException
	 */
	public void delete(EncashLogModel model) throws DataAccessException;

	/**
	 * 根据筛选的记录 更新某个字段
	 */
	public void updateEncashLogBySelect(EncashLogModel encashLog,
			EncashLogModel modelSelected);

	/**
	 * 分页查询数据
	 * @param pageSize
	 * @param pageNum
	 * @param encashQueryDomain
	 * @return
	 * @throws DataAccessException
	 */
	public Map getPageByDomain(AgentInfoModel curAgentInfoModel, EncashQueryDomain encashQueryDomain) ;

	/**
	 * 查询特定时间段内是否包含数据
	 * @param model
	 * @param delayTime
	 * @return
	 * @throws DataAccessException
	 */
	public  List<EncashLogModel> getListPeriodByModel(EncashLogModel model,int delayTime) throws DataAccessException;
}
